package com.dianping.cat.home.dal.report;

import java.util.Date;
import java.util.List;
import org.unidal.dal.jdbc.AbstractDao;
import org.unidal.dal.jdbc.DalException;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;

public class AlterationDao extends AbstractDao {
/*  11 */   public Alteration createLocal() { return new Alteration(); }





/*  17 */   public int deleteByPK(Alteration proto) throws DalException { return getQueryEngine().deleteSingle(AlterationEntity.DELETE_BY_PK, proto); }




  public List<Alteration> findByTypeDruation(Date startTime, Date endTime, String type, Readset<Alteration> readset) throws DalException {
/*  23 */     Alteration proto = new Alteration();

    proto.setStartTime(startTime);
/*  26 */     proto.setEndTime(endTime);
/*  27 */     proto.setType(type);

    return getQueryEngine().queryMultiple(AlterationEntity.FIND_BY_TYPE_DRUATION, proto, readset);
  }






  public List<Alteration> findByDtdh(Date startTime, Date endTime, String type, String domain, String hostname, Readset<Alteration> readset) throws DalException {
/*  38 */     Alteration proto = new Alteration();

/*  40 */     proto.setStartTime(startTime);
/*  41 */     proto.setEndTime(endTime);
/*  42 */     proto.setType(type);
/*  43 */     proto.setDomain(domain);
/*  44 */     proto.setHostname(hostname);

/*  46 */     return getQueryEngine().queryMultiple(AlterationEntity.FIND_BY_DTDH, proto, readset);
  }






  public List<Alteration> findByDtdhTypes(Date startTime, Date endTime, String type, String domain, String hostname, String[] types, Readset<Alteration> readset) throws DalException {
/*  55 */     Alteration proto = new Alteration();

/*  57 */     proto.setStartTime(startTime);
/*  58 */     proto.setEndTime(endTime);
/*  59 */     proto.setType(type);
/*  60 */     proto.setDomain(domain);
/*  61 */     proto.setHostname(hostname);
/*  62 */     proto.setTypes(types);

/*  64 */     return getQueryEngine().queryMultiple(AlterationEntity.FIND_BY_DTDH_TYPES, proto, readset);
  }






  public List<Alteration> findByDomainAndTime(Date startTime, Date endTime, String domain, Readset<Alteration> readset) throws DalException {
/*  73 */     Alteration proto = new Alteration();

/*  75 */     proto.setStartTime(startTime);
/*  76 */     proto.setEndTime(endTime);
/*  77 */     proto.setDomain(domain);

/*  79 */     return getQueryEngine().queryMultiple(AlterationEntity.FIND_BY_DOMAIN_AND_TIME, proto, readset);
  }






  public Alteration findByPK(int keyId, Readset<Alteration> readset) throws DalException {
/*  88 */     Alteration proto = new Alteration();

/*  90 */     proto.setKeyId(keyId);

/*  92 */     return (Alteration)getQueryEngine().querySingle(AlterationEntity.FIND_BY_PK, proto, readset);
  }








/* 102 */   protected Class<?>[] getEntityClasses() { return new Class[] { AlterationEntity.class }; }



/* 106 */   public int insert(Alteration proto) throws DalException { return getQueryEngine().insertSingle(AlterationEntity.INSERT, proto); }





/* 112 */   public int updateByPK(Alteration proto, Updateset<Alteration> updateset) throws DalException { return getQueryEngine().updateSingle(AlterationEntity.UPDATE_BY_PK, proto, updateset); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/dal/report/AlterationDao.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */